Release 10.1A: OpenEdge Getting Started:
Core Business Services
Identifying database events
It is important to be able to determine whether an event is a database event in order to know what the format of the
_event-detailfield is and whether to expect any child records in the_aud-audit-data-valuetable.One way is to check the event definition and rely on the event name ending in
.createor.deleteor.update. All the internal policies conform to this. This can be checked in code as follows:
This approach will work only if any user-defined events that relate to database events follow the same naming convention for the event name.
Another way is to check the contents of the
_event-detailfield for a specific format, as shown:
A similar approach could be used to identify other types of events with a specifically formatted
_event-detail. The primary consideration is to ensure the event definition follows some sort of naming convention to make all this possible and to be able to fall back to the event definition itself to determine the format of audit-related fields.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |